<template>  
  <view class="container">  
    <view class="button-group">  
      <button class="button" @click="handleClick1('button1')">{{$t('login.startUp.privacy')}}</button>  
      <button class="button" @click="handleClick2('button2')">{{$t('login.startUp.auth')}}</button>
	  <button class="button" @click="handleClick3()">国际化语言切换</button> 
    </view>   
  </view>  
</template>  
  
<script>  
export default {
  data() {
  	return {
  		changeFlat : 1
  	}
  },
  
  // onLoad() {
  // 	this.timer = setTimeout(() => {
  // 		uni.navigateTo({
  // 			url:'/pages/login/privacyDes'
  // 		});
  // 	},5000);
  // },
  
  methods: {  
    handleClick1(buttonName) {  
      uni.navigateTo({
      	url:'/pages/login/privacyDes'
      });  
    },
	handleClick2(buttonName) {
	  uni.navigateTo({
	  	url:'/pages/login/authDes'
	  });  
	},
	handleClick3() {
	  this.changeFlat = this.changeFlat+1;
	  if(this.changeFlat%2 ===0){
		uni.setLocale("es-PE");
		 this.$i18n.locale = 'es-PE'
	  }else{
		uni.setLocale("zh-CN");
		this.$i18n.locale = 'zh-CN'
	  }
	  
	}    
  }  
}  
</script>  
  
<style scoped>  
.container {  
  display: flex;  
  flex-direction: row;  
  justify-content: space-around;  
  align-items: center;  
  padding: 20px;  
}  
  
.button-group {  
  display: flex;  
}  
  
.button {  
  flex: 1;  
  margin: 10px;  
  padding: 10px 20px;  
  background-color: #007AFF;  
  color: #FFFFFF;  
  border-radius: 5px;  
}  
</style>